<!--
	URL/show/:title/experiences	
	app/views/experiences/show.html.erb 
	The show resume/experiences view - shows experiences for the resume of a user
	controller: experiences, action: show 
-->

<link rel="stylesheet" type="text/css" href="/stylesheets/resume_common.css" />
<link rel="stylesheet" type="text/css" href="/stylesheets/experiences/show.css" />	

<div class="heading">
	<h3> Experiences </h3>
	<div class="links">
		<%= link_to 'Add', '/new/'+@resume.title+'/experiences' %>	
		<%= link_to 'Edit', '/edit/'+@resume.title+'/experiences' %>
	</div>	
</div>

<% form_tag("", :method => "post") do %> <!-- Has to be a form to enable AJAX requests with authenticity tokens -->	
<% if @experiences.length!=0 %>
		<% @experiences.each do |experience| %>
		<table class="experience_table">
			<tr>
				<td class="column1">Title</td>
				<td><%=h experience.title %></td>
				<td><span id="delete_<%=h experience.id %>" class="deleteButton">Delete</span></td>
			</tr>
			<tr>
				<td class="column1">Company</td>
				<td><%=h experience.company %></td>
			</tr>
			<tr>
				<td class="column1">Duration</td>
				<td><%=h experience.duration %></td>
			</tr>
			<tr>
				<td class="column1">Role</td>
				<td class="role"><%=h experience.role %></td>
			</tr>
			<tr>
				<td class="column1">More Info</td>
				<td class="more_info"><%=h experience.more_info %></td>
			</tr>
		</table>		
		<% end # loop %>
<% else %>
	<p>
		No experience data.
		<%= link_to 'Add', '/new/'+@resume.title+'/experiences' %>	
	</p>
<% end # if-else %>
<% end #form %>

<script type="text/javascript" src="/javascripts/jquery-1.3.2.js"></script>
<script type="text/javascript" src="/javascripts/resume_common.js"></script>
<script type="text/javascript" src="/javascripts/experiences/show.js"></script>